public class Test2 {
    public static void main(String[] args) {
        int count=0;
        System.out.print("|");
        for (int i = 2; i <= 100; i++) {
            boolean flag = true;
            for (int j = 2; j < i/2; j++) {
                if (0 == i % j) {
                    flag = false;
                    break;
                }
                ++count;
            }
            if (flag) {
                System.out.print(i + "|");
            }
        }
        System.out.println("运算了"+(count+100-2+1)+"次");
    }
}
